
# author:高金磊
# datetime:2021/8/4 11:08
import warnings

from colorama import Style, init, Fore, Back


def __build(data: tuple):
    """
    格式化数据，使之尽可能接近实际打印()---不推荐使用
    :param data:
    :return:
    """
    warnings.warn("不再使用，效果没有内置函数好", DeprecationWarning)
    res = ''
    if len(data) == 0:
        return res
    for datum in data:
        ty = type(datum)
        if ty != int and ty != str:
            res += " " + str(datum) + " "
        else:
            res += str(datum)
    return res


def myPrint_Err(*s):
    print(Fore.LIGHTRED_EX, *s, Style.RESET_ALL)


def myPrint_Wran(*s):
    print(Fore.YELLOW, *s, Style.RESET_ALL)


def myPrint_Hint(*s):
    print(Fore.LIGHTMAGENTA_EX, *s, Style.RESET_ALL)


def myPrint_Success(*s):
    print(Fore.GREEN, *s, Style.RESET_ALL)


if __name__ == '__main__':
    myPrint_Err("1", "2", [1, 2])
    print(1)
    myPrint_Wran("333")
    myPrint_Hint(444)
    print("尽可能接近实际打印")
    myPrint_Hint([1, 2], 1, [2, 3])
    print([1, 2], 1, [2, 3])
